home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Mesolore
/
Mesolore - Disc 2.iso
/
mac
/
data
/
Nuttall.dir
/
00020_Script_SingleFrameLoop (cdx)
< prev
next >
Wrap
Text File
|
2001-01-30
|
4KB
|
136 lines
Global gLastPic
Global gShowBalloons, gShowText,gShowOrder
Global gIndex
on prepareframe
set the stagecolor = 255
if gShowOrder = TRUE then
repeat with x = 4 to 7
set the visible of sprite x = TRUE
end repeat
else
repeat with x = 4 to 7
set the visible of sprite x = FALSE
end repeat
end if
updatestage
end
on exitFrame
if not rollover(100) and not rollover(101) and not checkRollPanel() then --- 100 is left panel
if rollover(51) then
clearballoons "noCursor"
cursor [48,49]
else if rollover(52) then
clearballoons "noCursor"
cursor [50,51]
else if rollover(90) then
clearballoons "noCursor"
-- cursor 0
else if rollover(50) then
clearballoons
else if rollover(55) then
-- roll 55
clearballoons
else if rollover(56) then
-- roll 56
clearballoons
else
cursor 302
---- display balloons ----
if gShowBalloons = TRUE and the mouseCast <> -1 then
repeat with x = 45 down to 9
if sprite(x).member.type = #bitmap and rollover(x)then
if gLastpic = x then
exit repeat
end if
set the visible of sprite 60 = FALSE
set the member of sprite 60 = "balloon"
set the visible of sprite 61 = FALSE
set the member of sprite 61 = "bluehilite"
updatestage
set gLastPic = x
if the mousecast > 959 then abort
put findLine(the mouseCast) into field "balloon"
set the rect of member "balloon" = rect(0,0,400,200)-- set long so lengths ar calculated correctly
set the rect of member "balloon" = rect(0,0,getLength(),200)
--- vertical
if the locv of sprite x <= 240 then
set the locV of sprite 60 = (the bottom of sprite x) +20
else
set the locV of sprite 60 = the top of sprite x - (sprite(60).member.height) -20
end if
--- Horizontal
set over = (the locH of sprite x + the width of the member of sprite 60)
if over > 640 then
set the locH of sprite 60 = 640 - the width of the member of sprite 60 -10
else
set the locH of sprite 60 = max(10,the locH of sprite x - ((the width of sprite x)/2))
end if
if rollover(x) then --- if still rolledOver
if gShowBalloons = TRUE then
set the rect of sprite 61 = the rect of sprite x
set the visible of sprite 60 = TRUE
set the visible of sprite 61 = TRUE
updatestage
exit repeat
end if
end if
end if
end repeat
end if
end if
else
clearballoons
end if
go the frame
end
on getLength(what)
set holder = 0
set temp = field "balloon"
repeat with x = 1 to the number of chars in temp
holder = max(charPosToLoc(member "balloon",x)[1],holder)
end repeat
return holder+10
end
on clearballoons which
-- if voidp(which) then cursor 0
set the visible of sprite 60 = FALSE
set the visible of sprite 61 = FALSE
set gLastpic = ""
end
on findLine which
set the itemdelimiter = ","
set infoLine = line value(which - 460) of gIndex
set temp = field ("balloons" & (item 1 of infoline))
set x = value( item 2 of infoline)
set count = x + 1
repeat while line count of temp contains "%" = false and line count of temp <> empty
set count = count + 1
end repeat
set info = line (x+1) to count - 1 of temp
return info
end
on clear
if the memberNum of sprite 55 <> the mousecast then
unroll 55
end if
if the memberNum of sprite 56 <> the mousecast then
unroll 56
end if
end